captureToPng

Captures the node's pixels as PNG bytes, for attaching to a failure or comparing with a reference outside a snapshot library.

Under Robolectric, set robolectric.pixelCopyRenderMode=hardware and use native graphics.

Return

The PNG-encoded image.